package BinomialHeap;

import java.util.Random;

public class Tester {
	public static void main(String[] args) {
		
		
		
		Random gen = new Random();
		
		BinomialHeap heap = new BinomialHeap();
		
		for (int i = 0; i < 60000; i++) {
			heap.insert(gen.nextInt(1000000000));
			//if(i%100000 == 0)System.out.print(i/100000);
		}
		
		BinomialHeap heap2 = new BinomialHeap();
		
		for (int i = 0; i < 34737; i++) {
			heap.insert(gen.nextInt(1000000000));
			//if(i%100000 == 0)System.out.print(i/100000);
		}
		
		heap.meld(heap2);
		
		System.out.println(heap.size());
		
		

		
		System.out.println(heap.contains(34));
		
		System.out.println(heap.isValid());
		
		System.out.println(heap.size());
		
		System.out.println(heap.findMin());
		
		System.out.println("min rank: " + heap.minTreeRank());
		
		printBoolArray(heap);
		System.out.println();
		
		
		System.out.println(BinomialHeap.linkCounter);
		
	}

	public static void printBoolArray(BinomialHeap heap) {
		boolean[] boolArray = heap.binaryRep();
		for (int i=0; i<boolArray.length; i++) {
			if(boolArray[i])
				System.out.print(i + " ");
		}
	}

}
